<template>
  <div class="feature-version__container">
    <div class="table-panel">
      <resource-table
        ref="refResourceTable"
        v-loading="ifLoading"
        :table-columns="tableColumns"
        :showSelection="false"
        operations="edit,delete"
        :operation-column-width="160"
        @queryTable="getList"
      >
        <template #headerLeft>
          <div class="btn-list">
            <div class="btn-item btn-add" style="width: 100px">
              <el-button v-waves type="primary" style="width: 100px" @click="handlerAddNew">
                新增
              </el-button>
            </div>
          </div>
        </template>
        <template #headerRight="props">
          <div class="filter-conditions">
            <!-- <div class="filter-item">
              申请时间：
              <el-date-picker
                v-model="props.queryParameters.timeRange"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                @change="handlerClear"
              >
              </el-date-picker>
            </div>-->
            <!-- <div class="filter-item" style="margin-left: 10px">
              业务分组：
              <el-select
                v-model="props.queryParameters.businessType"
                size="small"
                style="width: 170px"
                placeholder="请选择业务分组"
                clearable
                @clear="handlerClear"
              >
                <el-option
                  v-for="item in businessTypeOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div>
            <div class="filter-item" style="margin-left: 10px">
              要素名称：
              <el-select
                v-model="props.queryParameters.featureName"
                size="small"
                style="width: 170px"
                placeholder="请选择要素名称"
                clearable
                @clear="handlerClear"
              >
                <el-option
                  v-for="item in featureNameOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div> -->
            <div class="filter-item" style="margin-left: 10px">
              要素版本：
              <el-input
                placeholder="请输入要素名称"
                size="small"
                style="width: 170px"
                clearable
                v-model="props.queryParameters.versionCName"
                @keyup.native="() => handlerInputValueChange('versionCName')"
                @clear="() => handlerClear('versionCName')"
              >
              </el-input>
            </div>
            <!-- <div class="filter-item" style="margin-left: 10px">
              版本迭代：
              <el-select
                v-model="props.queryParameters.featureVersionHistory"
                size="small"
                style="width: 170px"
                placeholder="请选择要素版本代"
                clearable
                @clear="handlerClear"
              >
                <el-option
                  v-for="item in featureVersionHistoryOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div> -->
            <!-- <div class="filter-item" style="margin-left: 10px">
              字段名称：
              <el-select
                v-model="props.queryParameters.fieldName"
                size="small"
                style="width: 170px"
                placeholder="请输入字段名称"
                clearable
                @clear="handlerClear"
              >
                <el-option
                  v-for="item in fieldNameOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div> -->
          </div>
        </template>
        <template #operation="props">
          <el-tooltip class="col-btn-icon" effect="dark" content="修改" placement="top">
            <el-button
              type="text"
              @click="handlerModify(props.rowInfo)"
              icon="el-icon-edit"
              style="font-size: 15px; color: #67c23a"
            ></el-button>
          </el-tooltip>
          <el-tooltip class="col-btn-icon" effect="dark" content="删除" placement="top">
            <el-button
              type="text"
              @click="handlerDelete(props.rowInfo)"
              icon="el-icon-delete"
              style="font-size: 15px; color: #f56c6c"
            ></el-button>
          </el-tooltip>
          <el-tooltip class="col-btn-icon" effect="dark" content="下载" placement="top">
            <el-button
              type="text"
              size="mini"
              icon="el-icon-download"
              @click="handlerDownload(props.rowInfo)"
              style="font-size: 15px; color: #409eff"
            >
            </el-button>
          </el-tooltip>
          <el-tooltip class="col-btn-icon" effect="dark" content="数据标准版本" placement="top">
            <el-button
              type="text"
              size="mini"
              icon="el-icon-s-management"
              @click="handlerFeatureVersionManage(props.rowInfo)"
              style="font-size: 15px; color: #409eff"
            >
            </el-button>
          </el-tooltip>
        </template>
      </resource-table>
    </div>
    <!-- 数据库信息窗口 -->
    <el-dialog
      :title="formDialogTitle"
      :center="true"
      :visible.sync="formDialogVisible"
      :close-on-click-modal="false"
      class="form-dialog"
      width="40%"
      height="40%"
    >
      <el-form :ref="refFormName" :model="form" :rules="formRules" label-width="80px">
        <el-form-item label="文档名称" prop="name">
          <el-input v-model="form.name" placeholder="请输入文档名称"></el-input>
        </el-form-item>
        <el-form-item label="文档标准" prop="standardType">
          <el-select v-model="form.standardType" placeholder="请选择文档标准" class="form-item">
            <el-option
              v-for="item in standardTypeOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="文档上传" prop="path">
          <el-upload
            :ref="refUploadFile"
            class="upload-doc"
            :auto-upload="false"
            :action="upload.url"
            :limit="upload.limit"
            :accept="upload.accept"
            :file-list="upload.fileList"
            :before-remove="uploadFileBeforeRemove"
            :on-remove="uploadFileRemove"
            :on-exceed="uploadFileExceed"
            :before-upload="uploadBeforeFile"
            :on-success="uploadFileSuccess"
            :on-change="uploadFileStateChange"
            :http-request="httpUpload"
            drag
          >
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
            <div class="el-upload__tip" slot="tip">
              只能上传 {{ upload.accept }} 格式文件，且不超过{{ upload.maxFielSize_M }}M
            </div>
          </el-upload>
        </el-form-item>
        <el-form-item label="备注" prop="desc">
          <el-input
            v-model="form.desc"
            type="textarea"
            placeholder="请输入备注"
            :rows="4"
          ></el-input>
        </el-form-item>
        <el-form-item label-width="0">
          <div style="width: 100%; text-align: center">
            <el-button type="primary" @click="handlerSubmit(refFormName)">确定</el-button>
            <el-button @click="handlerCancel(refFormName)">取消</el-button>
          </div>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
import * as moment from 'moment';
import waves from '@/directive/waves';
import { pageList, deleteOne, uploadStandardDocData, queryRelationshipExists } from '@/api/data-standard/standardDocs';

export default {
  name: 'FeatureVersion',
  components: {},
  directives: {
    waves,
  },
  data() {
    return {
      // 表格这遮罩
      ifLoading: false,
      // 业务分组
      businessTypeOptions: [
        {
          label: '常规监测',
          value: 'CGJC',
        },
        {
          label: '督察执法',
          value: 'DCZF',
        },
        {
          label: '用地审批',
          value: 'YDSP',
        },
        {
          label: '现状调查',
          value: 'XZDC',
        },
      ],
      // 要素名称
      featureNameOptions: [
        {
          label: '常规监测图斑',
          value: 'CGJCTB',
          pId: 'CGJC',
        },
        {
          label: '卫片执法国家下发图斑',
          value: 'WPZF_GJXFTB',
          pId: 'DCZF',
        },
        {
          label: '中间征地',
          value: 'TDZS_ZJK',
          pId: 'YDSP',
        },
        {
          label: '成果征地',
          value: 'TDZS_CGK',
          pId: 'YDSP',
        },
        {
          label: '地类图斑',
          value: 'DLTB',
          pId: 'XZDC',
        },
      ],
      // 要素版本
      featureVersionOptions: [
        {
          label: '地类图斑二调版',
          value: 'DLTB1',
          pId: 'DLTB',
        },
        {
          label: '卫片执法国家下发图斑',
          value: 'WPZF_GJXFTB1',
          pId: 'WPZF_GJXFTB',
        },
        {
          label: '中间征地',
          value: 'TDZS_ZJK1',
          pId: 'TDZS_ZJK',
        },
        {
          label: '成果征地',
          value: 'TDZS_CGK1',
          pId: 'TDZS_CGK',
        },
      ],
      // 版本迭代
      featureVersionHistoryOptions: [
        // {
        //   label: '在用要素版本',
        //   value: 'ONLINE_FEATURE_VERSION',
        // },
        {
          label: '最新要素版本',
          value: 'LATEST_FEATURE_VERSION',
        },
        {
          label: '所有要素版本',
          value: 'ALL_FEATURE_VERSION',
        },
      ],
      // 文档标准
      standardTypeOptions: [
        {
          label: '国家标准',
          value: 'GB',
        },
        {
          label: '地方标准',
          value: 'DB',
        },
        {
          label: '行业标准',
          value: 'HB',
        },
        {
          label: '自定义标准',
          value: 'MB',
        },
      ],
      // 表格列配置
      tableColumns: [
        {
          key: 0,
          prop: 'id',
          align: 'center',
          label: '唯一标识',
          width: '280',
        },
        {
          key: 1,
          prop: 'name',
          align: 'center',
          label: '标准、规范文档名称',
          width: '280',
        },
        {
          key: 2,
          prop: 'path',
          align: 'center',
          label: '存储路径',
          width: '280',
        },
        {
          key: 3,
          prop: 'standardType',
          align: 'center',
          label: '标准类型',
          width: '100',
        },
        {
          key: 4,
          prop: 'desc',
          align: 'center',
          label: '备注',
          minWidth: '280',
        },
      ],
      // 表格数据
      tableData: [],
      // 表单ref
      refFormName: 'dbForm',
      // 表单标题
      formDialogTitle: '',
      // 表单显隐
      formDialogVisible: false,
      // 默认的表单数据
      defaultForm: {
        id: null,
        name: '',
        standardType: '',
        path: '',
        desc: '',
      },
      // 表单数据
      form: {
        id: null,
        name: '',
        standardType: '',
        path: '',
        desc: '',
      },
      // 表单校验规则
      formRules: {
        name: [{ required: true, message: '请输入标准、规范文档名称', trigger: 'blur' }],
        standardType: [{ required: true, message: '请选择文档标准类型', trigger: 'blur' }],
        // path: [{ required: true, message: '请上传标准、规范文档', trigger: 'blur' }],
      },
      // 文件上传组件参数
      refUploadFile: 'refUploadFile',
      upload: {
        url: '', // excel文件上传路径
        // disabled: false, // 上传组件是否可用-永不启用，为true的时候，已上传的文件无法删除
        accept: '.docx,.doc,.pdf,.jpg,.png,.jpeg',
        limit: 1, // 上传的最大文件个数限制
        maxFielSize_M: 10, // 单个文件的限制大小（单位：M）
        fileList: [], // 上传的文件列表
      },
    };
  },
  mounted() {},
  methods: {
    /**
     * 获取表格数据
     */
    getList(queryParameters, callback) {
      const vm = this;
      if (JSON.stringify(vm.$route.query) !== '{}') {
        const refTable = vm.getRefDom('refResourceTable');
        if (refTable && vm.$route.query.hasOwnProperty('versionCName')) {
          vm.runtimeSet(
            refTable,
            refTable.queryParameters,
            'versionCName',
            vm.$route.query.versionCName,
          );
        }
      }
      const { versionCName, pageSize, page } = queryParameters;
      vm.ifLoading = true;
      pageList({
        query: {
          page: page,
          pageSize: pageSize,
        },
        data: {
          versionCName: !versionCName ? null : versionCName.trim(),
        },
      })
        .then((res) => {
          if (res.status === 'success') {
            vm.ifLoading = false;
            const {
              data: { items, total },
            } = res;
            const tableData = items.map((item) => {
              const {
                id,
                docName,
                filePath,
                docStandardType,
                docDesc,
                createTime,
                updateTime,
                isDeleted,
                featureVersionId,
                versionName,
                versionCName,
                versionSerial,
                isLatestVersion,
                featureId,
              } = item;
              return {
                id: id,
                name: docName,
                standardType: docStandardType,
                path: filePath,
                desc: docDesc,
              };
            });
            const dataTotalCount = total;
            callback({
              items: tableData,
              total: dataTotalCount,
            });
          } else {
            vm.$message({
              type: 'error',
              message: res.message,
            });
          }
        })
        .catch((err) => {
          throw err;
        });
    },
    /**
     * 查询
     */
    handlerQuery() {
      const vm = this;
      const refResourceTable = vm.getRefDom('refResourceTable');
      if (refResourceTable) {
        refResourceTable.queryTable();
      }
    },
    /**
     * 添加数据
     */
    handlerAddNew() {
      const vm = this;
      vm.formDialogTitle = '新增标准、规范文档信息';
      vm.resetFormFields();
      vm.formDialogVisible = true;
    },
    /**
     * 修改数据
     */
    handlerModify(row) {
      const vm = this;
      vm.formDialogTitle = '修改标准、规范文档信息';
      vm.resetFormFields();
      vm.form = row;
      vm.formDialogVisible = true;
    },
    /**
     * 删除数据
     */
    async handlerDelete(row) {
      const vm = this;
      const resData = await queryRelationshipExists({
        query: {
          standardDocId:row.id
        }
      });
      if (resData.status === 'success') {
        if (resData.data && resData.data && resData.data > 0) {
          vm.$message.warning('当前文档仍关联至少一个要素版本，请先删除关联数据');
          return;
        }
      } else {
        vm.$message.error(resData.message);
        return;
      }

      vm.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
        .then(() => {
          deleteOne({
            query: {
              id: row.id,
            },
          })
            .then((res) => {
              if (res.status === 'success') {
                vm.$message({
                  type: 'success',
                  message: '删除成功!',
                });
                vm.handlerQuery();
              } else {
                vm.$message({
                  type: 'error',
                  message: res.message,
                });
              }
            })
            .catch((err) => {
              throw err;
            });
        })
        .catch(() => {
          vm.$message({
            type: 'info',
            message: '已取消删除',
          });
        });
    },
    /**
     * 取消提交
     */
    handlerCancel() {
      const vm = this;
      vm.dialogClose();
    },
    /**
     * 提交审批信息
     */
    handlerSubmit(formName) {
      const vm = this;
      vm.$refs[formName].validate(async (valid) => {
        if (valid) {
          const { id, name, standardType, path, desc } = vm.form;
          const domUpload = vm.getRefDom(vm.refUploadFile);
          if (!domUpload) {
            vm.$message.error('严重错误，请联系管理员');
            throw new Error('Error: 未初始化文件上传组件');
          }
          const uploadFiles = domUpload.uploadFiles;
          if (id === null) {
            // 新增，必须上传文件
            if (uploadFiles.length <= 0) {
              vm.$message.error('请先上传文件');
              return;
            }
            domUpload.submit();
          } else {
            // 修改，不必须上传文件
            if (uploadFiles.length == 1) {
              // 上传了新文件
              domUpload.submit();
            } else {
              // 没上传新文件
              const formData = new FormData();
              formData.append('id', id);
              formData.append('docName', name);
              formData.append('docStandardType', standardType);
              formData.append('filePath', path);
              formData.append('docDesc', desc);
              formData.append('docFile', new File(['EmptyFile'], 'EmptyFile')); // 没上传新文件
              const { status, message, data } = await uploadStandardDocData(formData);
              if (status === 'success') {
                const { url } = data;
                vm.form.path = url;
                vm.$message.success('更新成功');
                const refUploadFile = vm.getRefDom(vm.refUploadFile);
                if (refUploadFile) {
                  vm.$nextTick(() => {
                    refUploadFile.clearFiles();
                  });
                }
                vm.dialogClose();
              } else {
                vm.$message.error(message);
              }
            }
          }
        } else {
          vm.$message.error('请正确填写表单项');
          return false;
        }
      });
    },
    /**
     * 下载
     */
    handlerDownload(row) {
      const vm = this;
      const { path, name } = row;
      const suffix = path.substring(path.lastIndexOf('.'));
      const fileName = name + suffix;
      vm.downloadUrlFile(path, fileName);
      vm.$message.success('下载成功');
    },
    /**
     * 上传的文件状态改变
     */
    uploadFileStateChange() {},
    /**
     * 已上传文件移除前事件
     */
    uploadFileBeforeRemove() {},
    /**
     * 移除已上传的文件
     */
    uploadFileRemove() {},
    /**
     * 上传文件之前的钩子
     */
    uploadBeforeFile(file) {
      const vm = this;
      const fileSuffix = file.name.substring(file.name.lastIndexOf('.'));
      const whiteList = vm.upload.accept.split(',');
      whiteList.forEach((item) => item.trim());
      if (!whiteList.includes(fileSuffix)) {
        vm.$message({
          type: 'error',
          message: `仅支持上传${whiteList.join(', ')}格式`,
        });
        return false;
      }
      const limitFileSize = vm.upload.maxFielSize_M;
      const isLtFileSize = file.size / 1024 / 1024 < limitFileSize;
      if (!isLtFileSize) {
        vm.$message({
          type: 'error',
          message: `上传的文件大小不能超过 ${limitFileSize}MB`,
        });
        return false;
      }
      console.log('即将上传的文件', vm.upload.fileList);
      return true;
    },
    /**
     * 文件超出个数限制时的钩子
     */
    uploadFileExceed() {
      const vm = this;
      vm.$message({
        type: 'warning',
        message: '仅支持单个文件上传，请先移除已上传的文件',
      });
    },
    /**
     * 文件上传成功时的钩子
     */
    uploadFileSuccess(response) {
      const vm = this;
      if (response.status === 'success') {
        const refUploadFile = vm.$refs[vm.refUploadFile];
        if (refUploadFile) {
          vm.$nextTick(() => {
            refUploadFile.clearFiles();
          });
        }
      } else {
        vm.$message({
          type: 'error',
          message: response.message,
        });
      }
    },
    /**
     * 规范、标准文档 上传
     */
    async httpUpload(httpRequest) {
      const vm = this;
      const { id, name, standardType, path, desc } = vm.form;
      const file = httpRequest.file;
      if (!id && !file) {
        // 新增，必须上传文件
        vm.$message.error('请先上传文件');
        return;
      }
      const formData = new FormData();
      formData.append('id', id);
      formData.append('docName', name);
      formData.append('docStandardType', standardType);
      formData.append('filePath', path);
      formData.append('docDesc', desc);
      formData.append('docFile', file);
      const { status, message, data } = await uploadStandardDocData(formData);
      if (status === 'success') {
        const { url } = data;
        vm.form.path = url;
        if (!id) {
          vm.$message.success('新增成功');
        } else {
          vm.$message.success('更新成功');
        }
        const refUploadFile = vm.getRefDom(vm.refUploadFile);
        if (refUploadFile) {
          vm.$nextTick(() => {
            refUploadFile.clearFiles();
          });
        }
        vm.dialogClose();
      } else {
        vm.$message.error(message);
      }
    },
    handlerInputValueChange(conditionName) {
      const vm = this;
      if (vm.$route.query && vm.$route.query.hasOwnProperty(conditionName)) {
        delete vm.$route.query[conditionName];
      }
    },
    /**
     * 检索条件清空
     */
    handlerClear(conditionName) {
      const vm = this;
      if (vm.$route.query && vm.$route.query.hasOwnProperty(conditionName)) {
        delete vm.$route.query[conditionName];
      }
      vm.handlerQuery();
    },
    /**
     * 弹窗关闭
     */
    dialogClose() {
      const vm = this;
      vm.resetFormFields();
      vm.formDialogVisible = false;
      vm.handlerQuery();
    },
    /**
     * 根据ref获取dom元素
     */
    getRefDom(refName) {
      const vm = this;
      return vm.$refs[refName];
    },
    /**
     * 重置表单字段并清空非法校验
     */
    resetFormFields() {
      const vm = this;
      const elForm = vm.$refs[vm.refFormName];
      if (elForm) {
        elForm.clearValidate();
      }
      vm.form = JSON.parse(JSON.stringify(vm.defaultForm));
    },
    /**
     * 数据标准版本
     */
    handlerFeatureVersionManage(row) {
      const vm = this;
      vm.$router.push({ path: `/data-standard/feature-version` });
    },
    // 下载
    downloadUrlFile(url, fileName = 'file') {
      const a = document.createElement('a');
      document.body.appendChild(a);
      a.style = 'display: none';
      a.href = url;
      a.download = fileName;
      a.click();
      window.URL.revokeObjectURL(url);
    },
  },
};
</script>

<style lang="scss" scoped>
.feature-version__container {
  height: calc(100vh - 85px);
  overflow: hidden;
  background-color: #f2f2f2;
  .content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 1);
    padding: 15px;
    display: flex;
    flex: 1;
    flex-direction: column;
    .panel-header {
      height: 40px;
    }
    .panel-content {
      flex: 1;
      height: calc(100% - 80px);
      padding: 12px 0;
    }
    .panel-footer {
      height: 40px;
    }
  }

  .search-conditions {
    display: flex;
    flex-direction: column;
    font-size: small;
    .condition-item {
      display: flex;
      align-items: center;
      margin-bottom: 15px;
      .item-label {
        width: 206px;
        text-align: right;
        padding-right: 10px;
      }
      .item-value {
        flex: 1;
      }
    }
  }

  .search-func {
    padding: 0px 10px;
    .btn-query {
      display: inline-block;
      width: 50%;
      padding-right: 10px;
    }
    .btn-reset {
      display: inline-block;
      width: 50%;
      padding-left: 10px;
    }
  }

  .panel-header {
    .table-func {
      width: 28%;
      .table-func-btn {
        display: inline-block;
        padding: 0px 10px;
        width: 25%;
      }
      .btn-add {
        padding-left: 0px;
      }
    }
  }

  .panel-content {
    ::v-deep .table-head-cell-style {
      text-align: center !important;
      color: rgba(100, 100, 100);
    }
    ::v-deep .table-head-cell-style {
      color: rgb(0, 0, 0);
      background: rgb(215, 215, 215);
    }
  }

  .panel-footer {
    display: flex;
    align-items: flex-end;
  }

  .btn-action {
    width: 100%;
    .btn-modify {
      display: inline-block;
      width: 50%;
      padding: 0px 10px;
    }
    .btn-approval {
      display: inline-block;
      width: 50%;
      padding: 0px 10px;
    }
  }

  // 临时
  .table-panel {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 1);
    // padding: 15px 10px;
  }

  .form-dialog {
    ::v-deep .el-dialog__header {
      text-align: center;
    }
    ::v-deep .el-dialog__body {
      padding: 20px !important;
      padding-top: 5px !important;
    }
    ::v-deep .normal-table-header-cell {
      color: rgb(0, 0, 0);
      background: rgb(215, 215, 215);
      font-weight: bold;
    }
  }

  ::v-deep .normal-table-header-cell {
    color: rgb(0, 0, 0);
    background: rgb(215, 215, 215);
    font-weight: bold;
  }

  .btn-list {
    .btn-item {
      display: inline-block;
      .el-button {
        // background: #169bd5;
        // border-color: #169bd5;
      }
    }
  }
  ::v-deep .header-search-button {
    // background: #169bd5;
    // border-color: #169bd5;
  }
  ::v-deep .col-btn-item {
    display: none;
  }
}

.form-dialog {
  .form-panel {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  .approval-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    .approval-list-item {
      height: 40px;
      line-height: 40px;
      flex: 1;
      display: flex;
      .label {
        width: 13%;
        text-align: center;
      }
      .value {
        flex: 1;
      }
    }
    .permission-approval {
      height: 40px;
      line-height: 40px;
    }
  }
  .approval-action {
    height: 60px;
    line-height: 60px;
    text-align: center;
    .btn-submit {
      width: 150px;
      background: #169bd5;
      border-color: #169bd5;
    }
  }

  ::v-deep .el-dialog__body {
    padding-bottom: 10px;
  }
}

.filter-conditions {
  .filter-item {
    display: inline-block;
    .el-button {
      background: #169bd5;
      border-color: #169bd5;
    }
  }
}

.form-item {
  width: 100%;
}

::v-deep .upload-doc {
  .el-upload {
    width: 100%;
    .el-upload-dragger {
      width: 100%;
    }
  }
}
</style>
